<!-- API服务 - 综合表单页面 -->
<template>
  <div class="page-container">
    <page_breadcrumb :getKeyMethod="init_table_model" @change="change_table_model" pageOption />
    <ex_super_table_page v-bind="option" ref="SuperTablePage">
    </ex_super_table_page>
    <api_request_record ref="api_request_record" />
  </div>
</template>
<script>


import superTablePageFunction from '@/mixin/super-table-page-function';
import page_table_model_manage from '@/mixin/page_table_model_manage';
import api_request_record from './dialog/api_request_record.vue';
export default {
  title: 'label_srm_api_request_manager',
  components: {api_request_record},
  mixins: [superTablePageFunction, page_table_model_manage,],
  data() {
    return {

      option: {
        search: {
          model: [

            {
              label: "label_srm_api_request_platform_code", key: "apiPlatformCode",
            },
            { label: "label_srm_api_request_api_service_code ", key: "apiServiceCode", },
            { label: "label_srm_api_request_order_no", key: "orderNo", },
            { label: "label_srm_api_order_buss_type", key: "businessType", type: 'select', enum: 'ApiCaiNiaoOrderTypeEnum',  },
            { label: "label_srm_api_request_success", key: "success", type: 'select', enum: 'TrueOrFalseEnum' },
          ],
        },
        action: [

        ],

        table: {
          url: "/srm-api/supplier/ApiServiceRequestLogRpc/selectList.json",
          model: this.init_table_model(),

        }
        ,

      },

    }
  },


  methods: {
    option_table_model() {
      return [
        { key: 'apiPlatformCode', label: 'label_srm_api_request_platform_code', },
        { key: 'apiServiceCode', label: 'label_srm_api_request_api_service_code', },
        { key: 'orderNo', label: 'label_srm_api_request_order_no', },
        { key: 'businessType', label: 'label_srm_api_order_buss_type', 'width': 150, 'show-overflow-tooltip': true, formatter: (r, c, v, i) => this.$enumShow(v, "ApiCaiNiaoOrderTypeEnum") },
        { key: 'customerCode', label: 'label_srm_api_request_customer_code', 'width': 150, 'show-overflow-tooltip': true, },
        { key: 'warehouseCode', label: 'label_srm_api_request_store_code', 'width': 150, 'show-overflow-tooltip': true, },
        { key: 'success', label: 'label_srm_api_request_success', 'width': 150, 'show-overflow-tooltip': true, formatter: (r, c, v, i) => this.$enumShow(v, "TrueOrFalseEnum") },
        { key: 'errorCode', label: 'label_srm_api_request_error_code', 'width': 150, 'show-overflow-tooltip': true, },
        { key: 'errorMsg', label: 'label_srm_api_request_error_message', 'width': 150, 'show-overflow-tooltip': true, },

        {
          type: 'operate', width: 160, operate: [
            {
              label: 'label_srm_api_request_view_record', click: (row) => {
                this.$refs.api_request_record.show({
                  params: { id: row.id },
                })
              }
            },

          ],
        }
      ]
    }
  }
};

</script>
<style></style>
